<?php
$this->pageTitle = 'Thay đổi mật khẩu';
$this->breadcrumbs = array(
	'Tài khoản' => array('profile'),
	'Thay đổi mật khẩu',
);
?>
<div class="heading">
    <h1><img src="<?php echo Util::themeUrl() ?>/images/header.ico" /><?php echo $this->pageTitle?></h1>

    <div class="controls">
        <?php
        if(!isset($_GET['ajax']))
            echo CHtml::link("Trở lại trang trước", array('profile'),  array('class' => 'controls'));
        ?>
    </div>
</div>

<div class="content">
	<div class="form">
		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'changepassword-form',
			'enableAjaxValidation'=>true,
			'clientOptions'=>array(
				'validateOnSubmit'=>true,
			),
		)); ?>

			<p class="note"><?php echo UserModule::t('Fields with <span class="required">*</span> are required.'); ?></p>
			<?php //echo $form->errorSummary($model); ?>

			<div class="row">
			<?php echo $form->labelEx($model,'oldPassword'); ?>
			<?php echo $form->passwordField($model,'oldPassword'); ?>
			<?php echo $form->error($model,'oldPassword'); ?>
			</div>

			<div class="row">
			<?php echo $form->labelEx($model,'password'); ?>
			<?php echo $form->passwordField($model,'password'); ?>
			<?php echo $form->error($model,'password'); ?>
			</div>

			<div class="row">
			<?php echo $form->labelEx($model,'verifyPassword'); ?>
			<?php echo $form->passwordField($model,'verifyPassword'); ?>
			<?php echo $form->error($model,'verifyPassword'); ?>
			</div>


			<div class="row buttons">
			<?php echo CHtml::submitButton(UserModule::t("Save")); ?>
			</div>

		<?php $this->endWidget(); ?>
		</div><!-- form -->
	</div>